package com.cn.studemo.demos.web.mapper;


import com.cn.studemo.demos.web.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * TODO
 *
 * @ClassName UserMapper
 * @Author xiaojiang
 * @Date 2021/12/23 下午 15:57
 */
@Mapper
@Repository
public interface UserMapper {

    Integer addUserOneByOne(User user);


    void addByOneSQL(@Param("users") List<User> users);

    @Select("select count(*) from aaa")
    int getUserCount();

    @Select("select * from aaa order by id DESC limit #{page},#{pageSize}")
    List<User> getUser(@Param("page")int page, @Param("pageSize")int pageSize);

}
